Skip to content

Conversation

@YashK2005
Copy link
Collaborator

@YashK2005 YashK2005 commented Nov 30, 2025

TDLR: Implemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash

i'm too lazy to write one so here's claude's pr message:

Summary

Implements comprehensive participant dashboard improvements including
call scheduling, requesting new times, cancelling calls, profile editing,
and contact form functionality.

What Changed

Participant Dashboard Features

  • Call Scheduling: Participants can now schedule calls by selecting
    from volunteer-proposed time blocks with a clean date/time picker
    interface
  • Request New Times: Two-step flow allowing participants to propose
    alternative availability when volunteer times don't work
  • Cancel Calls: Soft-delete flow with confirmation and success modals
  • Edit Profile: Comprehensive modal for editing personal details,
    cancer experience, and account settings
  • Contact Form: Shared component accessible from both participant and
    volunteer dashboards

Backend API Enhancements

  • Added /contact/submit endpoint for contact form (with logging; email
    integration pending)
  • Enhanced match endpoints: /schedule, /cancel, /request-new-times
  • Updated /user-data/me PATCH to support timezone and language updates
  • Fixed logout endpoint to properly handle auth_id to user_id conversion
  • Match cancellation now uses soft-delete pattern (sets deleted_at and
    cleans up time blocks)

UI/UX Improvements

  • Refactored participant dashboard components for better state management
  • Added timezone awareness (EST) across scheduling flows
  • Improved modal consistency and user feedback
  • Enhanced dashboard navigation with sidebar and profile dropdown
  • Better handling of past/future time blocks

Data & Testing

  • Enhanced seed data with volunteer experiences, availability templates,
    and timezone information
  • More realistic test data for end-to-end testing

Technical Details

New Components:

  • ParticipantEditProfileModal - Full profile editing
  • DaySelectionCalendar - Multi-day selection calendar
  • CancelCallConfirmationModal & CancelCallSuccessModal
  • RequestNewTimesSuccessModal
  • ViewContactDetailsModal
  • ContactForm & ContactSuccessModal
  • ReadOnlyDiagnosisField
  • AccountSettings

New Pages:

  • /participant/schedule/[matchId] - Call scheduling interface
  • /participant/request-new-times/[matchId] - Request new availability
  • /participant/dashboard/contact - Contact form
  • /volunteer/dashboard/contact - Volunteer contact form

API Client Updates:

  • participantMatchAPIClient - Added scheduleMatch, cancelMatch,
    requestNewTimes
  • contactAPIClient - New client for contact form submission
  • authAPIClient - Enhanced logout to clear both backend and Firebase
    sessions

Testing Checklist

  • Participant can schedule a call from proposed times
  • Participant can request new times when volunteer times don't work
  • Participant can cancel a scheduled call
  • Participant can edit profile including timezone and language
  • Contact form works for both participants and volunteers
  • Past time blocks are filtered out
  • Logout properly clears all session data
  • Seed data includes realistic test scenarios

Known Limitations

  • Contact form logs messages but doesn't send emails yet (email
    integration pending)
  • All times displayed in EST (future: respect user timezone preference)

🤖 Generated with Claude Code

… profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash
@YashK2005
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +83 to +87
// Group time slots by day
const slotsByDay: { [day: string]: TimeSlot[] } = {};
timeSlots.forEach((slot) => {
if (!slotsByDay[slot.day]) {
slotsByDay[slot.day] = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix request-new-times day key mismatch

The request-new-times flow never includes the selected slots in the payload. convertTimeSlotsToTimeRanges stores selectedDays by full weekday name (e.g., "Monday"), but the slots coming from TimeScheduler use abbreviated keys like "Mon" (see slot.day). When iterating dayNameToDate later, slotsByDay[dayName] is always empty, so timeRanges stays empty and the POST to /matches/{id}/request-new-times submits no ranges, failing validation (backend MatchRequestNewTimesRequest requires at least one range). Participants who pick days and hours will always get a 422 instead of submitting their availability.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 fake news bruh it works

@YashK2005 YashK2005 marked this pull request as ready for review November 30, 2025 02:11
@YashK2005 YashK2005 changed the title implemented scheduling call, request new times, cancelling call, edit… iImplemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash Nov 30, 2025
@YashK2005 YashK2005 changed the title iImplemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash Implemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash Nov 30, 2025
@YashK2005 YashK2005 changed the title Implemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash Scheduling a call, request new times, cancelling call, & edit profile flows in participant dash. Contact form and sign out button for participant and volunteer dash. Nov 30, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +95 to +99
Object.keys(dayNameToDate).forEach((dayName) => {
const day = dayNameToDate[dayName];
const daySlots = slotsByDay[dayName] || [];

if (daySlots.length === 0) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix day-name mismatch when building new-time ranges

The new-times payload is always empty: convertTimeSlotsToTimeRanges iterates over selected days keyed by full weekday names, then looks up slots with slotsByDay[dayName]. However, TimeScheduler normalizes visibleDays to abbreviated names like Mon/Tues (see frontend/src/components/dashboard/TimeScheduler.tsx lines 167‑180), so slotsByDay never shares the same keys. Even when the user selects hours, daySlots stays empty and the request sends suggested_new_times: [], which the /matches/{id}/request-new-times endpoint rejects (Pydantic requires at least one range). This currently prevents participants from submitting new time requests at all.

Useful? React with 👍 / 👎.

@YashK2005
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +94 to +97
// For each selected day, find the corresponding time slots
Object.keys(dayNameToDate).forEach((dayName) => {
const day = dayNameToDate[dayName];
const daySlots = slotsByDay[dayName] || [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix day label mismatch when building request time ranges

In convertTimeSlotsToTimeRanges the loop looks up daySlots using the full weekday names produced by toLocaleDateString (e.g., “Tuesday”), but the TimeScheduler feeds slot.day values using abbreviated labels (Mon, Tues, etc.). That mismatch means slotsByDay[dayName] is always empty, so timeRanges stays empty and the POST to /matches/{id}/request-new-times fails validation (suggested_new_times requires at least one entry) whenever a participant submits new availability.

Useful? React with 👍 / 👎.

@YashK2005 YashK2005 merged commit e0d2069 into main Dec 14, 2025
5 checks passed
@YashK2005 YashK2005 deleted the yash/particpant-dash-improvements branch December 14, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant